import java.io.File;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        File file = new File("./Demo.txt.txt");
        String parent = file.getParent();
        String name = file.getName();
        String path = file.getPath();
        String absolutePath= file.getAbsolutePath();
        String canonicalPath=file.getCanonicalPath();
        System.out.println(parent);
        System.out.println(name);
        System.out.println(path);
        System.out.println(absolutePath);
        System.out.println(canonicalPath);
    }
}
